package com.rongc.client.freight.business.mine.view.adapter;

import android.content.Context;

import com.rongc.client.freight.R;
import com.rongc.client.freight.base.view.adapter.RecyclerBaseAdapter;

import java.util.List;

/**
 * Created by ccqx on 2017/6/28.
 */

public class RecyclerKeyboardAdapter extends RecyclerBaseAdapter<String>{


    public RecyclerKeyboardAdapter(Context mContext, List<String> mDatas) {
        super(mContext, mDatas);
    }

    @Override
    protected void onBind(final BaseRecyclerViewHolder holder, int position, String data) {
        holder.setText(R.id.tv_content,data);
    }

    @Override
    public int getItemCount() {
        return 6;
    }

    public String getData(){
        String str = "";
        for (String s :
                mDatas) {
            str += s;
        }
        return str;
    }

    @Override
    public String getItemData(int position) {
        if(position >= mDatas.size()) return "";
        return super.getItemData(position);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.recycler_keyboard_item;
    }
}
